﻿<Window x:Class="MetaTracker.View.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:MetaTracker.View"
        xmlns:converters="clr-namespace:MetaTracker.Converters"
        Title="tehcrash's MetaTracker" WindowStartupLocation="CenterScreen"
        Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        d:DesignHeight="480" 
        d:DesignWidth="839" 
        Height="634"
        Width="1214">
        <!--SizeToContent="WidthAndHeight">-->
    <Window.Resources>
        <converters:TabSizeConverter x:Key="tabSizeConverter" />
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="Height">
                <Setter.Value>
                    <MultiBinding Converter="{StaticResource tabSizeConverter}">
                        <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type TabControl}}" />
                        <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type TabControl}}" Path="ActualHeight" />
                    </MultiBinding>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Row="1"
                Name="tabControl1" 
                FlowDirection="LeftToRight" 
                TabStripPlacement="Left"
                VerticalContentAlignment="Center" >
            <TabItem Header="User &#x0a;Selection" Name="userSelectionTab" >
                <local:UserSelectionView />
            </TabItem>
            <TabItem Header="User &#x0a;Settings" Name="tabItem2" 
                IsEnabled="{Binding IsLoggedOn, 
                UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
                <local:UserSettingsView />
            </TabItem>
            <TabItem Header="Weight" Name="tabItem3" 
                     IsEnabled="{Binding UserHasWeight, 
                     UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
                <local:WeightServiceView />
            </TabItem>
            <TabItem Header="Exercise" Name="tabItem4"
                     IsEnabled="{Binding UserHasExercise, 
                     UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
                <local:ExerciseServiceView />
            </TabItem>
            <TabItem Header="Food&#x0a;Intake" Name="tabItem5"
                     IsEnabled="{Binding UserHasFood, 
                     UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
                <local:FoodIntakeServiceView />
            </TabItem>
            <TabItem Header="Statistics" Name="tabItem6"
                     IsEnabled="{Binding UserHasStatistics, 
                     UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
                <local:StatisticsView />
            </TabItem>
        </TabControl>
        <StackPanel Grid.Row="2">
            
            <StatusBar Name="statusBar1" Height="28" VerticalAlignment="Bottom" />
        </StackPanel>



    </Grid>
    
</Window>
